package com.lingyi.calligraphybg.dto;

import lombok.Data;

@Data
public class Result {
    private String msg;
    private Object data;
    private Integer code;
    public static Result success(Object data){
        Result result = new Result();
        result.code = 200;
        result.data = data;
        result.msg = "success";
        return result;
    }
    public static Result fail(String msg){
        Result result = new Result();
        result.code = 500;
        result.msg = msg;
        result.data = null;
        return result;
    }
    public static Result success(){
        return success(null);
    }
}
